package com.ht.base.system.client;


import com.ht.base.system.common.pojo.bo.SysRoleBO;
import com.ht.base.system.common.pojo.qto.SysRoleQTO;
import org.base.common.appexception.AppException;
import org.base.common.appexception.ResultData;
import org.base.common.page.PageBO;

public interface SysRoleClient {
    /**
     * 新增角色
     * @param roleBO
     * @return
     * @throws AppException
     */
    ResultData<SysRoleBO> insertRole(SysRoleBO roleBO) throws AppException;
    /**
     * 修改角色
     * @param roleBO
     * @return
     * @throws AppException
     */
    ResultData<Boolean> updateRole(SysRoleBO roleBO) throws AppException;
    /**
     * 修改角色状态
     * @param roleBO
     * @return
     * @throws AppException
     */
    ResultData<Boolean> updateRoleStatus(SysRoleBO roleBO) throws AppException;
    /**
     * 通过角色ID数组删除角色
     * @param sysRoleIds
     * @return
     * @throws AppException
     */
    ResultData<Boolean> delRoleByIds(Long[] sysRoleIds) throws AppException;

    /**
     * 通过ID删除角色
     * @param sysRoleId
     * @return
     * @throws AppException
     */
    ResultData<Boolean> delRoleById(Long sysRoleId) throws AppException;

    /**
     * 通过ID查询角色
     * @param sysRoleId
     * @return
     * @throws AppException
     */
    ResultData<SysRoleBO> findRoleById(Long sysRoleId) throws AppException;

    /**
     * 通过用户ID查询用户的角色
     * @param sysUserId
     * @return
     * @throws AppException
     */
    ResultData<SysRoleBO> findRoleByUserId(Long sysUserId) throws AppException;

    /**
     * 分页查询角色列表
     * @param qto
     * @return
     * @throws AppException
     */
    ResultData<PageBO<SysRoleBO>> findRoleForPage(SysRoleQTO qto) throws AppException;


}
